// loading
export default {
  data() {
    return {
      load: ''
    }
  },
  methods: {
    openLoading(autoClose = true, target = document.body) {
      this.load = this.$loading({
        target,
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      autoClose && setTimeout(() => {
        this.load.close();
      }, 10000);
    },
    loadingClose() {
      setTimeout(() => {
        this.load.close();
      }, 500);
    }
  }
}
